﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RoleCtrl_Enemy : RoleCtrl
{
	EPChainController epChainController = new EPChainController();

	protected float targetHI = 0;
	protected float targetVI = 0;

	protected override void Update()
	{
		//horizenInput = Mathf.SmoothStep(horizenInput, targetHI, 1f);
		//verticalInput = Mathf.SmoothStep(verticalInput, targetVI, 1f);
		//animator.SetFloat("Horizontal", horizenInput);
		//animator.SetFloat("Vertical", verticalInput);
		
		//epChainController.CurChain.Deal(this);
	}
	protected override void FixedUpdate()
	{

		SubManagerMove.FixedUpdate();
		//upSpeed = verticalInput > 0 ? moveSpeed * Mathf.Abs(verticalInput) : -moveSpeed * Mathf.Abs(verticalInput);
		//rightSpeed = horizenInput > 0 ? moveSpeed * Mathf.Abs(horizenInput) : -moveSpeed * Mathf.Abs(horizenInput);
		//rb2d.velocity = new Vector3(rightSpeed, upSpeed, 0);
	}
	private void LateUpdate()
	{

	}
	protected override void OnCollisionEnter2D(Collision2D collision)
	{
		base.OnCollisionEnter2D(collision);
	}
	
	public void SetMoveSpeed(Vector2 _speed)
	{
		//targetHI = _speed.x;
		//targetVI = _speed.y;
		//rb2d.velocity = _speed *2;
		//animator.SetFloat("Horizontal", _speed.x);
		//animator.SetFloat("Vertical", _speed.y);
	}
	protected override void OnInit()
	{
		base.OnInit();
		RoleEntity.CurrentScore -= 0;
	}

	private void OnDrawGizmos()
	{
		//Gizmos.color = Color.blue;
		//Gizmos.DrawWireCube(this.transform.position, new Vector2(18,18));
		//Gizmos.color = Color.red;
		//Gizmos.DrawWireCube(this.transform.position, new Vector2(24, 24));

		//Gizmos.DrawLine(this.transform.position, this.transform.position + new Vector3( SubManagerMove.VelocityDir.x, SubManagerMove?.VelocityDir.y, 0));
	}
}
